import fetch from "@/fetch";

// 获取试卷
export const getExamination = (params) => {
  return fetch({
    method: "post",
    url: "/resource/getExamination",
    data: params,
    loading: true,
  });
};

// contentType: "application/json",
// 交卷
export const submitPaper = (params) => {
  return fetch({
    method: "post",
    url: "/resource/submitPaper",
    data: params,
    loading: true,
  });
};

// 继续答题
export const getContinueExam = (params) => {
  return fetch({
    method: "get",
    url: "/resource/getContinueExam",
    params,
    loading: true,
  });
};

// 重新答题
export const redoPractice = (params) => {
  return fetch({
    method: "get",
    url: "/resource/redoPractice",
    params,
    loading: true,
  });
};

// 获取考试记录
export const getExamPaper = (params) => {
  return fetch({
    method: "get",
    url: "/statistic/getExamPaper",
    params,
    loading: true,
  });
};

// 重新练习权限
export const getRedoJudge = (params) => {
  return fetch({
    method: "get",
    url: "/resource/getRedoJudge",
    params,
  });
};
